package com.owc.domain.DO;

import com.owc.common.tool.UtilsService;

public class UpdateRecordDO {

    private static final String _LOG_TEMPLATE = "[{}] {}修改{},由{}改为{}";

    /**
     * 方法名称
     */
    private String functionName;

    /**
     * 修改人名称
     */
    private String updateUserName;

    /**
     * 修改人ID
     */
    private Long updateUserId;

    /**
     * 旧值
     */
    private String oldValue;

    /**
     * 新值
     */
    private String newValue;

    /**
     * 修改时间
     */
    private String time;

    /**
     * 描述
     */
    private String desc;

    public String getFunctionName() {
        return functionName;
    }

    public void setFunctionName(String functionName) {
        this.functionName = functionName;
    }

    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getOldValue() {
        return oldValue;
    }

    public void setOldValue(String oldValue) {
        this.oldValue = oldValue;
    }

    public String getNewValue() {
        return newValue;
    }

    public void setNewValue(String newValue) {
        this.newValue = newValue;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void loadDesc(){
        this.desc = UtilsService.stringFormat(_LOG_TEMPLATE,this.getTime(),this.getUpdateUserName(),this.functionName,this.getOldValue(),this.getNewValue());
    }
}
